# -*- coding: utf-8 -*-
'''
@File: config.py
@Time: 2023/5/5 23:39
@Author: sunda
'''
"""各种配置类"""
class BaseConfig(object):
    """所有配置类的基类"""
    SECRET_KEY = "LOVE"
    DEBUG = True
    TESTING = False
    VISIT_TIME = 0  # 网站访问次数
    # 数据库配置
    # SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:自己的MySql密码@localhost/personalwebsite"
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123456@101.35.129.200/website"
    # SQLALCHEMY_DATABASE_URI = 'sqlite:///test.db'
    SQLALCHEMY_TRACK_MODIFICATIONS = False  # 是否追踪数据库的修改
    # 设置文件上传保存路径
    UPLOAD_FOLDER= './app/static/file/'
    # MAX_CONTENT_LENGTH设置上传文件的大小，单位字节
    MAX_CONTENT_LENGTH = 1*1024*1024

class ProductionConfig(BaseConfig):
    """生产环境下的配置类"""
    DEBUG = False


class DevelopmentConfig(BaseConfig):
    """开发模式下的配置类"""
    DEBUG = True
    TESTING = True
